package pers.course.week11.PrintFile;

import java.io.*;

public class PrintFile {
    public static void main(String[] args) throws IOException {
        String[] str = new String[20];
        String std = "time";
        int num = 0;
        try {
            BufferedReader in = new BufferedReader(new FileReader("src/pers/course/week11/PrintFile/input.txt"));
            while ((str[num] = in.readLine()) != null) {
                num++;
            }
        } catch (IOException ignored) {
        }
        BufferedWriter out = new BufferedWriter(new FileWriter("src/pers/course/week11/PrintFile/output.txt"));
        for (int i = 0; i < num; i++) {
            if (str[i].contains(std)) {
                out.write("第" + (i + 1) + "行: " + str[i]);
                if (i < num - 1) {
                    out.newLine();
                }
            }
        }
        out.close();
    }
}
